package com.sias.realestate.web.service.impl;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sias.realestate.core.generic.GenericDao;
import com.sias.realestate.core.generic.GenericServiceImpl;
import com.sias.realestate.web.dao.PriceMapper;
import com.sias.realestate.web.model.Price;
import com.sias.realestate.web.service.PriceService;

@Service
public class PriceServiceImpl extends GenericServiceImpl<Price, Integer> implements PriceService{

	@Resource
	private PriceMapper pricemapper;

	@Override
    public int insert(Price model) {
        return pricemapper.insertSelective(model);
    }

    @Override
    public int update(Price model) {
        return pricemapper.updateByPrimaryKeySelective(model);
    }

    @Override
    public int delete(Integer id) {
        return pricemapper.deleteByPrimaryKey(id);
    }

    @Override
    public Price selectById(Integer id) {
        return pricemapper.selectByPrimaryKey(id);
    }
    
	@Override
	public List<Price> selectList() {
		// TODO Auto-generated method stub		
		return pricemapper.findAll();
	}
	@Override
	public GenericDao<Price, Integer> getDao() {
		// TODO Auto-generated method stub
		return pricemapper;
	}


}
